package org.csmzxy.class2333;

import javax.net.ssl.SSLContext;

public class pra2 {
    public static void main(String[] args) {
        double arr[] = {45, 777, 12, 10, 2};
        double sum = 0;
        double average;
        int i = 0;
        for (; i < 5; i++) {
            sum += arr[i];
        }
        average = sum / i;
        System.out.println("总和为" + sum);
        System.out.println("平均数为"+ average);
    }
}
